// 初始化仓库
export const initState = {
    cateList:[],
    cateGoods:[],
}

export const reducer = (state, action) => {
    switch (action.type) {
        case "changeCateGoods":
            return {
                ...state,
                cateGoods:action.arr
            }
        case "changeCateList":
            return {
                ...state,
                cateList:action.arr
            }
        default:
            return state
    }
}

export const actions = {
    changeCateList:(arr)=>({type:"changeCateList",arr}),
    changeCateGoods:(arr)=>({type:"changeCateGoods",arr}),
}